////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008 Duykham.
// All Rights Reserved.
// Author: Duykham (duykham@gmail.com)
// Modified: 20081030
// TODO: 
//
////////////////////////////////////////////////////////////////////////////////
package dk.agrasys
{	
	[Bindable]
	/**
	 * Data of each track that measured by sensor 
	 * @author Duykham
	 * 
	 */
	public class Track
	{
		//public var date:String;
		//public var time:String;
		public var nhietdo:String;
		public var doam:String;
		public var label:String;
		
		/**
		 * Constructor 
		 * @param track
		 * 
		 */		 
		public function Track(track:Object=null)
		{
			/* if (track != null)
			{ */
				fill(track);
			//}
		}
		
		/**
		 * Load data from an XML node to an array element 
		 * @param track
		 * 
		 */		
		public function fill(track:Object):void 
		{
				//this.date = track.date;
				//this.time = track.time;
				if (track == null) 
				{
					this.label = "...";
				}
				else
				{
					this.label = track.l;
					//this.label = track.l;
					this.nhietdo = track.n;
					this.doam = track.d;
				}
		}
	}
}